package org.clockworkmages.games.anno1186.scripting;

import org.clockworkmages.games.anno1186.GameStateService;
import org.clockworkmages.games.anno1186.Injected;

public class PlotScriptingWrapper {

	@Injected
	private GameStateService gameStateService;

	public String get(String plotId) {
		String plotValue = gameStateService.getGameState().getPlot()
				.get(plotId);
		return plotValue;
	}

	public boolean is(String plotId) {
		String plotValue = gameStateService.getGameState().getPlot()
				.get(plotId);
		return Boolean.TRUE.toString().equals(plotValue);
	}

	public void set(String plotId) {
		gameStateService.getGameState().getPlot()
				.put(plotId, Boolean.TRUE.toString());
	}

	public void set(String plotId, String plotValue) {
		gameStateService.getGameState().getPlot().put(plotId, plotValue);
	}

}
